< previous page page_315 next page >

Page 315
e10a6a0a59f035e870d90cca05b85fce.gif
            ImaZ0 = ImaZ0 + dImaZ0
        Next j
        ReaZ0 = ReaZ0 + dReaZ0

        ' Let the user know we're not dead.
        If i Mod 10 = 0 Then
            picCanvas.Line (0, 0)-(wid, i), vbWhite, BF
            picCanvas.Refresh
        End If
    Next i

    ' Update the image.
    SetBitmapPixels picCanvas, bits_per_pixel, pixels 
    picCanvas.Refresh
    picCanvas .Picture = picCanvas. Image

    Caption = "Julia (" & Format$(m_Xmin) & ", " & _
        Format$(m_Ymin) & ")-(" & _
        Format$(m_Xmax) & ", "& _
        Format$(m_Ymax) & ")"
End Sub
Interestingly, the Mandelbrot set forms a strange kind of map for Julia sets. You can use the coordinates of any point in a Mandelbrot set as the real and imaginary parts of the value C for drawing a Julia set. Some of the most interesting Julia sets are created when C corresponds to a point close to one of the fuzzy edges of the Mandelbrot set.
Example program Julia is similar to program Mand. You can use it to display a Mandelbrot set and zoom in on areas of interest. If you select the Options menu's Julia command, the program displays the Julia set with the value of C corresponding to the point in the center of the currently displayed area in the Mandelbrot set. In other words, to select a value of C that corresponds to a point near the edge of the Mandelbrot set, zoom in on that point in the Mandelbrot display and then invoke the Julia command.
While you are displaying a Julia set, you can zoom in on areas much as you can for the Mandelbrot set. You can also alter the appearance of the picture by changing the maximum number of iterations the program computes for each pixel. If you increase the number of iterations, the magnitude of Zn exceeds 2 for more of the pixels. The program gives those pixels the default background color, so the resulting image contains fewer non-background pixels.
Often, you need to adjust the number of iterations for a particular Julia set to produce the best result. If the number is too small, the program makes many pixels colorful, but the picture may not have much detail. If the number is too large, the program will set most or all of the pixels to the background color, and there may be very little to see.
After you have finished looking at the current Julia set, select the Options menu's Mandelbrot command. The program once again displays the Mandelbrot set, so you can zoom in on a new value for C and create a different Julia set.
Figure 10.31 shows views of four different Julia sets.

 
< previous page page_315 next page >